package com.xtx.controller.user;
import com.xtx.result.Result;
import com.xtx.service.DetialService;
import com.xtx.vo.GoodsDetailVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/detail")
@Slf4j
public class DetialController {

    @Autowired
    private DetialService detialService;

    @GetMapping("/goods")
    public Result<GoodsDetailVo> getGoodsDetail(Integer id){
        return Result.success(detialService.getGoodsDetail(id));
    }
}
